home *** CD-ROM | disk | FTP | other *** search
/ National Security Press Kit / National Security Press Kit.iso / mac / Acrobat Reader 5 / Acrobat Reader 5.0 / Acrobat Reader 5.0.rsrc / TEXT_514_Color Separations.txt < prev    next >
Text File  |  2001-09-24  |  4KB  |  233 lines

  1. %%BeginResource: procset sep_ops
  2. %%Version: 4.0 1
  3. %%Copyright: Copyright 1987-1999 Adobe Systems Incorporated. All Rights Reserved.
  4. %%Title: Support for Separations in Level 1, following the conventions of Tech Note 5044
  5. userdict /sep_ops 50 dict dup begin put
  6. /bdef {bind def} bind def
  7. /xdef {exch def} bdef
  8. /colorimagebuffer {
  9. 0 1 2 index length 1 sub {
  10. dup 2 index exch get 255 exch sub 2 index 3 1 roll put
  11. } for
  12. } bdef
  13. /addprocs {
  14. [ 3 1 roll
  15. /exec load
  16. dup 3 1 roll
  17. ] cvx
  18. } bdef
  19. /L1? {
  20. systemdict /languagelevel known {
  21. systemdict /languagelevel get 2 lt
  22. }{
  23. true
  24. } ifelse
  25. } bdef
  26. /colorexists {
  27. statusdict /processcolors known {
  28. statusdict /processcolors get exec
  29. }{
  30. /deviceinfo where {
  31. pop deviceinfo /Colors known {
  32. deviceinfo /Colors get
  33. statusdict /processcolors {
  34. deviceinfo /Colors known {
  35. deviceinfo /Colors get
  36. }{
  37. 1
  38. } ifelse
  39. } put
  40. }{
  41. 1
  42. } ifelse
  43. }{
  44. 1
  45. } ifelse
  46. } ifelse
  47. 1 gt
  48. } bdef
  49. /colorplate colorexists { 0 } { 5 } ifelse def
  50. /negativecolorplate false def
  51. /setcmykcolor where {
  52. pop
  53. gsave
  54. 1 0 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  55. 0 1 0 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  56. 0 0 1 0 setcmykcolor systemdict /currentgray get exec 1 exch sub
  57. 0 0 0 1 setcmykcolor systemdict /currentgray get exec 1 exch sub
  58. 4 {4 copy} repeat
  59. grestore
  60. 1 dict begin
  61. /foureq {
  62. 4 index eq 8 1 roll
  63. 4 index eq 8 1 roll
  64. 4 index eq 8 1 roll
  65. 4 index eq 8 1 roll
  66. pop pop pop pop and and and
  67. } def
  68. 1 0 0 0 foureq {/colorplate 1 store} if
  69. 0 1 0 0 foureq {/colorplate 2 store} if
  70. 0 0 1 0 foureq {/colorplate 3 store} if
  71. 0 0 0 1 foureq {/colorplate 4 store} if
  72. 0 0 0 0 foureq {/colorplate 6 store} if
  73. end
  74. } if
  75. 0 systemdict /currenttransfer get exec exec
  76. 1 systemdict /currenttransfer get exec exec
  77. 2 copy
  78. eq
  79. {
  80. /colorplate 6 store
  81. pop
  82. /negativecolorplate exch 0.5 lt store
  83. }
  84. {
  85. gt /negativecolorplate exch store
  86. }
  87. ifelse
  88. /findcmykcustomcolor where { pop }
  89. {
  90. /findcmykcustomcolor {
  91. [ 6 1 roll ] readonly
  92. } bdef
  93. } ifelse
  94. /setoverprint where {
  95. pop
  96. }{
  97. /setoverprint {
  98. pop
  99. } bdef
  100. } ifelse
  101. /currentoverprint where {
  102. pop
  103. }{
  104. /currentoverprint {
  105. false
  106. } bdef
  107. } ifelse
  108. /setcustomcolor where {
  109. pop
  110. }{
  111. L1? {
  112. /setcustomcolor {
  113. exch
  114. aload pop pop
  115. 4 { 4 index mul 4 1 roll } repeat
  116. 5 -1 roll pop
  117. setcmykcolor
  118. } bdef
  119. }{
  120. /setcustomcolor {
  121. exch
  122. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  123. 0 4 getinterval
  124. [ exch /dup load exch cvx {mul exch dup}
  125. /forall load /pop load dup] cvx
  126. ] setcolorspace setcolor
  127. } bdef
  128. } ifelse
  129. } ifelse
  130. /ik 0 def
  131. /iy 0 def
  132. /im 0 def
  133. /ic 0 def
  134. /imagetint {
  135. ic .3 mul
  136. im .59 mul
  137. iy .11 mul
  138. ik add add add dup
  139. 1 gt {pop 1} if
  140. } bdef
  141. /setcmykcolor where {
  142. pop
  143. }{
  144. /setcmykcolor {
  145. /ik xdef /iy xdef /im xdef /ic xdef
  146. imagetint
  147. 1 exch sub setgray
  148. } bdef
  149. } ifelse
  150. /customcolorimage where {
  151. pop
  152. }{
  153. L1? {
  154. /customcolorimage{
  155. gsave
  156. colorexists {
  157. aload pop pop
  158. /ik xdef /iy xdef /im xdef /ic xdef
  159. currentcolortransfer
  160. {ik mul ik sub 1 add} addprocs
  161. 4 1 roll {iy mul iy sub 1 add} addprocs
  162. 4 1 roll {im mul im sub 1 add} addprocs
  163. 4 1 roll {ic mul ic sub 1 add} addprocs
  164. 4 1 roll setcolortransfer
  165. /magentabuf 0 string def
  166. /yellowbuf 0 string def
  167. /blackbuf 0 string def
  168. {
  169. colorimagebuffer dup length magentabuf length ne
  170. {
  171. dup length dup dup
  172. /magentabuf exch string def
  173. /yellowbuf exch string def
  174. /blackbuf exch string def
  175. } if
  176. dup magentabuf copy yellowbuf copy
  177. blackbuf copy pop
  178. } addprocs
  179. {magentabuf}{yellowbuf}{blackbuf} true 4 colorimage
  180. }{
  181. aload pop pop /ik xdef /iy xdef /im xdef /ic xdef /tint
  182. imagetint def
  183. currenttransfer
  184. {tint mul 1 tint sub add} addprocs settransfer image
  185. } ifelse
  186. grestore
  187. } bdef
  188. }{
  189. /customcolorimage {
  190. gsave
  191. [ exch /Separation exch dup 4 get exch /DeviceCMYK exch
  192. 0 4 getinterval
  193. [ exch /dup load exch cvx {mul exch dup}
  194. /forall load /pop load dup] cvx
  195. ] setcolorspace
  196. 10 dict begin
  197. /ImageType 1 def
  198. /DataSource exch def
  199. /ImageMatrix exch def
  200. /BitsPerComponent exch def
  201. /Height exch def
  202. /Width exch def
  203. /Decode [1 0] def
  204. currentdict end
  205. image
  206. grestore
  207. } bdef
  208. } ifelse
  209. } ifelse
  210. /setseparationgray where {
  211. pop
  212. }{
  213. L1? {
  214. /setseparationgray { 1 exch sub dup dup dup setcmykcolor } bdef
  215. }{
  216. /setseparationgray {
  217. [/Separation /All /DeviceCMYK {dup dup dup}] setcolorspace
  218. 1 exch sub setcolor
  219. } bdef
  220. } ifelse
  221. } ifelse
  222. /separationimage where { pop }
  223. {
  224. /separationimage {
  225. gsave
  226. 1 1 1 1 (All)
  227. findcmykcustomcolor customcolorimage
  228. grestore
  229. } bdef
  230. } ifelse
  231. currentdict readonly pop end
  232. %%EndResource
  233.